import { App, ref } from 'vue'
import { Dicts, queryBatch } from '@api/dicts'
export default function useDicts(app: App) {
  const dicts = ref<Partial<Dicts>>({})
  async function getDicts(data: string[]) {
    const res = await queryBatch(data)
    dicts.value = res.data
    console.log('res数据：', res.data)
  }
  app.mixin({
    data() {
      return {
        dicts,
        a: 1
      }
    },
    methods: {
      getDicts,
      run() {
        console.log('11111')
      }  
    }
  })
}
